1. Field of the Invention
The present invention relates to an electronic control unit (ECU) for controlling automobiles and/or automotive engines, and particularly to an improvement in a method of data writing to a stand-by random access memory (RAM), electrically-erasable programmable read-only memory (EEPROM) or the like to be provided in the relevant electronic control unit.
2. Related Art
GB2191613A (JP-A No. S62-258154) discloses a data backup apparatus. In this apparatus, if a constant voltage Vcc drops during a periodical writing process of data on the occasion of conducting the periodical writing of data, such a write process is instantaneously stopped and an interrupt process (routine) for saving the data is executed preferentially. Therefore, when the periodical write process is recovered after the end of interrupt process, it is thought that the SRAM write process is inhibited (restricted) in the course of such a write process. During this event, it is assumed that the data before and after the write process co-exist in the SRAM and erroneous write process is conducted.
For example, if the data before the write process and the data after the write process co-exist, the concurrency is lost in such a case as writing the data that requires concurrency such as combination of the timing for starting receiving an engine knock signal (gate opening time) and the timing for ending receiving the same (gate closing time).
Moreover, when there are many important data that must be saved for the data saving process accompanied by the most preferential interrupt process, a longer time is required for the data saving process. Accordingly, all data that requires the saving will not be written in the SRAM within the accessible time thereof.
In Japanese Unexamined Utility Model Publication No. S63-84800, when the constant voltage Vcc drop, the write operation of data in the course of writing to SRAM is continued and when writing of data is completed, such write operation is suspended. Therefore, also in the event that the data that requires concurrency is written, the concurrency of data is lost because the data writing is stopped in the course of the writing operation and the data after the end of data writing and the data before the start of data writing co-exist.
Thus, the vehicle or engine controllability is lessened when data is read from SRAM after recovery of the constant voltage for use in the control of engine or vehicle, if concurrency is lost for the data that requires the concurrency and the data is erroneously written.